package com.ccys.app.feignClient;

import com.ccys.app.feignClient.fallback.EmailFallback;
import com.ccys.db.dto.discount.MatchingPremiumCouponsDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @program: WhiteCoat
 * @description: 邮件相关的远程调用
 * @author: ZhangJingCan
 * @create: 2024-02-04 15:38
 **/
@FeignClient(value = "cms", fallbackFactory = EmailFallback.class,url = "")
public interface EmailFeignClient {

    /**
     * 根据传入的用户信息查询到匹配的优惠卷 - 并且会发送邮件给用户
     *
     * @param dto 用户信息
     */
    @PostMapping("/discount/promoCodeAutomated/queryAvailablePremiumCouponsByEmail")
    void queryAvailablePremiumCouponsByEmail(@RequestBody MatchingPremiumCouponsDto dto);

}
